Streaming Pattern Matching with d Wildcards
نویسندگان
چکیده
In the pattern matching with d wildcards problem we are given a text T of length n and a pattern P of length m that contains d wildcard characters, each denoted by a special symbol ′?′. A wildcard character matches any other character. The goal is to establish for each m-length substring of T whether it matches P . In the streaming model variant of the pattern matching with d wildcards problem the text T arrives one character at a time and the goal is to report, before the next character arrives, if the last m characters match P while using only o(m) words of space. In this paper we introduce two new algorithms for the d wildcard pattern matching problem in the streaming model. The first is a randomized Monte Carlo algorithm that is parameterized by a constant 0 ≤ δ ≤ 1. This algorithm uses Õ(d1−δ) amortized time per character and Õ(d1+δ) words of space. The second algorithm, which is used as a black box in the first algorithm, is a randomized Monte Carlo algorithm which uses O(d + logm) worst-case time per character and O(d logm) words of space. 1998 ACM Subject Classification F.2.2 Nonnumerical Algorithms and Problems
منابع مشابه
On the Average-case Complexity of Pattern Matching with Wildcards
In this paper we present a number of fast average-case algorithms for pattern matching with wildcards. We consider the problems where wildcards are restricted to either the pattern or the text, however, the results can be easily adapted to the case where wildcards are allowed in both. We analyse the algorithms average-case complexity and their expected-case complexity and show new lower bounds ...
متن کاملResearch on Pattern Matching with Wildcards and Length Constraints: Methods and Completeness
© 2012 Wang et al., licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Research on Pattern Matching with Wildcards and Length Constraints: Methods and Complet...
متن کاملError Tree: A Tree Structure for Hamming & Edit Distances & Wildcards Matching
Error Tree is a novel tree structure that is mainly oriented to solve the approximate pattern matching problems, Hamming and edit distances, as well as the wildcards matching problem. The input is a text of length n over a fixed alphabet of length Σ, a pattern of length m, and k. The output is to find all positions that have ≤ k Hamming distance, edit distance, or wildcards matching with P . Th...
متن کاملMulti-pattern Matching with Wildcards
Multi-pattern matching with wildcards is to find all the occurrences of a set of patterns with wildcards in a text. This problem arises in various fields, such as computational biology and network security. But the problem is not extensively studied as the single pattern case and there is no efficient algorithm for this problem. In this paper, we present efficient algorithms based on the fast F...
متن کاملA Simple Obfuscation Scheme for Pattern-Matching with Wildcards
We give a simple and efficient method for obfuscating pattern matching with wildcards. In other words, we construct a way to check an input against a secret pattern, which is described in terms of prescribed values interspersed with unconstrained “wildcard” slots. As long as the support of the pattern is sufficiently sparse and the pattern itself is chosen from an appropriate distribution, we p...
متن کامل